import { listHotShops } from '@/service/query/shop';
import ShopImageCarousel from './shop-image-carousel';

export default async function HotShop() {
  const { result, error } = await listHotShops();
  if (error) return <div className="text-center py-10">{error.message}</div>;
  if (result.length > 0)
    return (
      <>
        <div className="font-bold text-lg text-end">全站热销</div>
        <ShopImageCarousel shops={result} />
      </>
    );
  return null;
}
